filter enum using linq query

74

filter enum using linq query -

  var enumList = Enum.GetValues(typeof (ProcessStatus))
                     .OfType<ProcessStatus>().Cast<byte>();

  var result = enumList.Intersect(processListIDs)
                       .Cast<ProcessStatus>();

Comments

Submit
0 Comments